-- GENERATED SPELL FOR [Crystalline Frayer] --


function spell0_26793(pUnit, Event) --@Aura of Regeneration,Self--
pUnit:FullCastSpellOnTarget(52067,pUnit)
pUnit:RegisterEvent('Sorts_26793', 0, 1)
end

function spell1_26793(pUnit, Event) --@Aura of Regeneration,Self--
pUnit:FullCastSpellOnTarget(57056,pUnit)
pUnit:RegisterEvent('Sorts_26793', 0, 1)
end

function spell2_26793(pUnit, Event) --@Crystal Bloom,n/a--
pUnit:FullCastSpellOnTarget(48058,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26793', 30275, 1)
end

function spell3_26793(pUnit, Event) --@Ensnare,n/a--
pUnit:FullCastSpellOnTarget(48053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26793', 5336, 1)
end

function spell4_26793(pUnit, Event) --@Seed Pod,Self--
pUnit:FullCastSpellOnTarget(48082,pUnit)
pUnit:RegisterEvent('Sorts_26793', 0, 1)
end

function Sorts_26793(pUnit, Event)
local choix_sorts_26793 = math.random(0, 4)
if choix_sorts_26793 == 0 then
pUnit:RegisterEvent('spell0_26793', 1, 1)
end
if choix_sorts_26793 == 1 then
pUnit:RegisterEvent('spell1_26793', 1, 1)
end
if choix_sorts_26793 == 2 then
pUnit:RegisterEvent('spell2_26793', 1, 1)
end
if choix_sorts_26793 == 3 then
pUnit:RegisterEvent('spell3_26793', 1, 1)
end
if choix_sorts_26793 == 4 then
pUnit:RegisterEvent('spell4_26793', 1, 1)
end
end

function mob26793_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26793', math.random(1500, 3000), 1)
end

function mob26793_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26793_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26793_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26793, 1, 'mob26793_Action')
RegisterUnitEvent(26793, 2, 'mob26793_Leave')
RegisterUnitEvent(26793, 3, 'mob26793_Kill')
RegisterUnitEvent(26793, 4, 'mob26793_Die')
